const Webpack = require('webpack');
const WebpackDevServer = require('webpack-dev-server');
const devConfig = require('./config.develop.js');

const compiler = Webpack(devConfig);
const devServerConfig = {...devConfig.devServer};
const devServer = new WebpackDevServer(devServerConfig, compiler);
const startDevServer = async () => {
	console.log(new Date().getTime() + ' startup webpack dev server....');
	await devServer.start();

};

module.exports = startDevServer;